@extends('layout.admin')

@section('content')
<!-- 放一个表单 -->
<div class="mws-panel grid_8">
	<div class="mws-panel-header">
    	<span>帖子添加</span>
    </div>
    <div class="mws-panel-body no-padding">
          

    	<form class="mws-form" action="/card/insert" method="post" enctype="multipart/form-data">
        	@if(count($errors) > 0)
			<div class="mws-form-message warning">
				@foreach($errors->all() as $error)
					{{$error}}<br>
				@endforeach
			</div>
            @endif 

    		<div class="mws-form-inline">
    			<div class="mws-form-row">
    				<label class="mws-form-label">标题</label>
    				<div class="mws-form-item">
    					<input class="small" type="text" name="title" value="{{old('title')}}">
    				</div>
    			</div>
    			<div class="mws-form-row">
    				<label class="mws-form-label">用户id</label>
    				<div class="mws-form-item">
    					<input class="small" type="text" name="author" value="{{old('uid')}}">
    				</div>
    			</div>
    			<div class="mws-form-row">
    				<label class="mws-form-label">时间</label>
    				<div class="mws-form-item">
    					<input class="small" type="text" name="time" value="{{old('time')}}">
    				</div>
    			</div>

    			<div class="mws-form-row">
    				<label class="mws-form-label">内容</label>
    				<div class="mws-form-item">
    					<input class="small" type="text" name="content" value="{{old('content')}}">
    				</div>
    			</div>

                <div class="mws-form-row">
                    <label class="mws-form-label">文章配图</label>
                    <div class="mws-form-item">
                        <input class="small" type="file" name="profile" value="{{old('profile')}}">
                    </div>
                </div>
    		</div>
    		<div class="mws-button-row">
    			<!-- 添加隐藏域 -->
    			{{csrf_field()}}
    			<input value="添加" class="btn btn-danger" type="submit">
    			<input value="重置" class="btn " type="reset">
    		</div>
    	</form>
    </div>    	
</div>
@endsection